Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle® Spatial Java API Reference 10g Release 2 (10.2) B14373-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.spatial.network
Interface Link

All Superinterfaces:
  java.lang.Cloneable, java.lang.Comparable, java.io.Serializable

public interface Link
extends java.lang.Cloneable, java.io.Serializable, java.lang.Comparable

This interface defines a network link.

Method Summary
`java.lang.Object` | `clone()` Clones the link.
`double[]` | `computeDistanceRatio(double x, double y)` Computes the distance ratio along a spatial link geometry.
`Link[]` | `getChildLinkArray()` Returns the child links as an array.
`java.util.Iterator` | `getChildLinks()` Returns the child links as an Iterator.
`Link[]` | `getCoLinks()` Returns the co-links as an array.
`double` | `getCost()` Returns the link cost.
`double` | `getDuration()` Gets link duration information
`double` | `getEndMeasure()` Gets the end measure of the referenced LRS geometry.
`Node` | `getEndNode()` Returns the end node.
`double` | `getFlow()` Returns the flow on the link after flow analysis
`JGeometry` | `getGeometry()` Returns the link geometry (JGeometry).
`int` | `getGeomID()` Returns the LRS geometry ID.
`int` | `getID()` Returns the link ID.
`int` | `getLinkLevel()` Returns the link level.
`java.lang.String` | `getName()` Returns the link name.
`Network` | `getNetwork()` Returns the network that contains the link.
`int` | `getNoOfChildLinks()` Gets number of child links Returns 0 if the network is a non-hierarchical network
`int` | `getNoOfSibilingLinks()` Gets number of sibling links Sibling links are links with the same parent
`Link` | `getParentLink()` Returns the parent link.
`int` | `getPartitionID()` Returns the link partition ID
`Link[]` | `getSiblingLinkArray()` Retunrs the sibling links as a Link array.
`java.util.Iterator` | `getSiblings()` Returns the sibling links as an Iterator.
`double` | `getStartMeasure()` Gets the start measure of the referenced LRS geometry.
`Node` | `getStartNode()` Returns the start node.
`boolean` | `getState()` Returns the link state.
`java.lang.String` | `getType()` Returns the link type.
`java.lang.Object` | `getUserData()` Gets the user defined data.
`java.lang.Object` | `getUserData(java.lang.String name)` Gets user data
`boolean` | `isActive()` Checks if the link is active.
`boolean` | `isBidirected()` Checks if the link is bidiretced
`boolean` | `isExternalLink()` Checks if the link is an external link that refers nodes in different networks
`boolean` | `isLogical()` Checks if the link is logical.
`boolean` | `isTemporary()` Checks if the link is temporary.
`boolean` | `isUnidirected()` Checks if the link is uni-diretced
`MDPoint` | `locatePoint(double distanceRatio)` Returns the (linearly interpreted) point on the link geometry of the given distance ratio.
`void` | `makeTemporary()` Makes the link temporary.
`MDPoint[]` | `nearestPoint(double x, double y)` Returns the nearest point on the link geometry.
`Node` | `otherNode(Node node)` Returns the other node of the link, if the start node = node, the end node is returned.
`void` | `setBidirected(boolean isBidirected)` Makes the directed link bidirected
`void` | `setCost(double cost)` Sets the link cost.
`void` | `setDuration(double duration)` Sets the link duration
`void` | `setEndNode(Node node)` Sets the link end node.
`void` | `setFlow(double flow)` Sets the flow on the link for flow analysis
`void` | `setGeometry(JGeometry geom)` Sets the link geometry (JGeometry).
`void` | `setGeomID(int id)` Sets the LRS geometry ID of this link.
`void` | `setLinkLevel(int level)` Sets the link level.
`void` | `setMeasure(double startMeasure, double endMeasure)` Sets the LRS start and end measures.
`void` | `setName(java.lang.String name)` Sets the link name.
`void` | `setParentLink(Link link)` Sets the parent link.
`void` | `setPartitionID(int partitionID)` Sets the link partition ID
`void` | `setStartNode(Node node)` Sets the link start node.
`void` | `setState(boolean state)` Sets the active flag.
`void` | `setType(java.lang.String type)` Sets the link type.
`void` | `setUserData(java.lang.Object userData)` Sets the user defined data.
`void` | `setUserData(java.lang.String name, java.lang.Object data)` Sets user data

Methods inherited from interface java.lang.Comparable
`compareTo`

Method Detail

### getID

    public int getID()

  Returns the link ID.

### getName

    public java.lang.String getName()

  Returns the link name.

### getStartNode

    public Node getStartNode()

  Returns the start node.

### getEndNode

    public Node getEndNode()

  Returns the end node.

### getCost

    public double getCost()

  Returns the link cost.

### getState

    public boolean getState()

  Returns the link state.

### getLinkLevel

    public int getLinkLevel()

  Returns the link level.

### getType

    public java.lang.String getType()

  Returns the link type.

### getNetwork

    public Network getNetwork()

  Returns the network that contains the link.

### getGeometry

    public JGeometry getGeometry()

  Returns the link geometry (JGeometry).
  See Also:
    `JGeometry`

### getCoLinks

    public Link[] getCoLinks()

  Returns the co-links as an array. The co-link of a given link is defined as a link with reverse direction. i.e. the start node of the co-link = the end node of the link, and the end node of the co-link = the start node of the link.

### getParentLink

    public Link getParentLink()

  Returns the parent link.

### getChildLinkArray

    public Link[] getChildLinkArray()

  Returns the child links as an array.

### getChildLinks

    public java.util.Iterator getChildLinks()

  Returns the child links as an Iterator.

### setLinkLevel

    public void setLinkLevel(int level)

  Sets the link level.
  Parameters:
    `level` - the link level to be set

### setType

    public void setType(java.lang.String type)

  Sets the link type.
  Parameters:
    `type` - the link type to be set

### setCost

    public void setCost(double cost)

  Sets the link cost.
  Parameters:
    `cost` - the link cost to be set

### setName

    public void setName(java.lang.String name)

  Sets the link name.
  Parameters:
    `name` - the link name to be set

### setStartNode

    public void setStartNode(Node node)

  Sets the link start node.
  Parameters:
    `node` - the start node of the link

### setEndNode

    public void setEndNode(Node node)

  Sets the link end node.
  Parameters:
    `node` - the end node of the link

### setGeometry

    public void setGeometry(JGeometry geom)

  Sets the link geometry (JGeometry).
  Parameters:
    `geom` - the geometry of the link
  See Also:
    `JGeometry`

### setParentLink

    public void setParentLink(Link link)

  Sets the parent link.
  Parameters:
    `link` - parent link to be set

### isTemporary

    public boolean isTemporary()

  Checks if the link is temporary.
  Returns:
    true if the link is temporary, false otherwise

### makeTemporary

    public void makeTemporary()

  Makes the link temporary.

### otherNode

    public Node otherNode(Node node)

  Returns the other node of the link, if the start node = node, the end node is returned. If the the end node = node, the start node is returned.
  Parameters:
    `node` - the specified end node.

### setGeomID

    public void setGeomID(int id)

  Sets the LRS geometry ID of this link.
  Parameters:
    `id` - the LRS geometry ID

### getGeomID

    public int getGeomID()

  Returns the LRS geometry ID.
  Returns:
    the LRS geometry ID

### setMeasure

    public void setMeasure(double startMeasure,
                           double endMeasure)

  Sets the LRS start and end measures.
  Parameters:
    `startMeasure` - the start measure of the referenced LRS geometry
    `endMeasure` - the end measure of the referenced LRS geometry

### getStartMeasure

    public double getStartMeasure()

  Gets the start measure of the referenced LRS geometry.
  Returns:
    the start measure of the referenced LRS geometry

### getEndMeasure

    public double getEndMeasure()

  Gets the end measure of the referenced LRS geometry.
  Returns:
    the end measure of the referenced LRS geometry

### isLogical

    public boolean isLogical()

  Checks if the link is logical.

### isActive

    public boolean isActive()

  Checks if the link is active.

### isBidirected

    public boolean isBidirected()

  Checks if the link is bidiretced

### isUnidirected

    public boolean isUnidirected()

  Checks if the link is uni-diretced

### setBidirected

    public void setBidirected(boolean isBidirected)

  Makes the directed link bidirected

### getUserData

    public java.lang.Object getUserData()

  Gets the user defined data.
  Returns:
    userData the user data as an Object

### setUserData

    public void setUserData(java.lang.Object userData)

  Sets the user defined data.
  Parameters:
    `userData` - the user data as an Object

### setState

    public void setState(boolean state)

  Sets the active flag.
  Parameters:
    `state` - true if active, false otherwise

### clone

    public java.lang.Object clone()

  Clones the link.

### getSiblings

    public java.util.Iterator getSiblings()

  Returns the sibling links as an Iterator.

### getSiblingLinkArray

    public Link[] getSiblingLinkArray()

  Retunrs the sibling links as a Link array.

### isExternalLink

    public boolean isExternalLink()

  Checks if the link is an external link that refers nodes in different networks

### getFlow

    public double getFlow()

  Returns the flow on the link after flow analysis

### setFlow

    public void setFlow(double flow)

  Sets the flow on the link for flow analysis

### getDuration

    public double getDuration()

  Gets link duration information

### setDuration

    public void setDuration(double duration)

  Sets the link duration

### getPartitionID

    public int getPartitionID()

  Returns the link partition ID

### setPartitionID

    public void setPartitionID(int partitionID)

  Sets the link partition ID
  Parameters:
    `partitionID` - link partition ID

### setUserData

    public void setUserData(java.lang.String name,
                            java.lang.Object data)

  Sets user data
  Parameters:
    `name` - name for the user data
    `data` - user data

### getUserData

    public java.lang.Object getUserData(java.lang.String name)

  Gets user data
  Parameters:
    `name` - name for the user data
  Returns:
    user data as an Java Object

### nearestPoint

    public MDPoint[] nearestPoint(double x,
                                  double y)
                           throws NetworkDataException

  Returns the nearest point on the link geometry. It throws a NetworkDataException if the link is not a spatial link. It works on linestring geometry only If there exist multiple points with the same minimum distance. All of them will be returned.
  Parameters:
    `x` - first ordinate of the given point.
    `y` - second ordinate of the given point.
  Returns:
    the point(s) (MDPoint array) on the link geometry that has the minimum euclidean distance.
  Throws:
    `NetworkDataException`

### computeDistanceRatio

    public double[] computeDistanceRatio(double x,
                                         double y)
                                  throws NetworkDataException

  Computes the distance ratio along a spatial link geometry. The given point can be on or off the given link geometry. If the point is off the link geometry, a snap operation is performed to the point(s) on the link geometry that has the minimum distance to the given point (x,y). If there exist multiple points with the same minimum distance, all of them will be returned. It works on linestring geometry only. The (Euclidean) distance is computed from the start point of the link geometry. The distance ratio is the distance divided by the link geometry length. For non-spatial links, a NetworkDataException will be thrown.
  Parameters:
    `x` - first ordinate of the given point
    `y` - second ordinate of the given point
  Returns:
    the distance ratio array (between 0.0 and 1.0 inclusive)
  Throws:
    `NetworkDataException`

### locatePoint

    public MDPoint locatePoint(double distanceRatio)
                        throws NetworkDataException

  Returns the (linearly interpreted) point on the link geometry of the given distance ratio. The (Euclidean) distance ratio is between 0.0 and 1.0 The ratio is defined as the distance from the start point to this point over the distance (length) of the link geometry. This function works on linestring geometry. It throws a NetworkDataException if the link is non-spatial or non-linestring geometry
  Parameters:
    `distanceRatio` - the distance ratio (Euclidean distance)
  Returns:
    the point (MDPoint) identified by the given distance ratio
  Throws:
    `NetworkDataException`

### getNoOfChildLinks

    public int getNoOfChildLinks()

  Gets number of child links Returns 0 if the network is a non-hierarchical network

### getNoOfSibilingLinks

    public int getNoOfSibilingLinks()

  Gets number of sibling links Sibling links are links with the same parent

Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle® Spatial Java API Reference 10g Release 2 (10.2) B14373-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2005, Oracle. All Rights Reserved.